#ifndef PARRALAX_H
#define PARRALAX_H

#include <ClanLib/core.h>
#include <list>
#include "viewport.h"

class Parralax
{
	float xMultiplier, yMultiplier;
	CL_Surface surface;

public:
	void draw(Viewport &viewport);

	Parralax();
	Parralax(const std::string &resource_id, CL_ResourceManager* manager);
	~Parralax();
};

class ParralaxManager
{
	std::list<Parralax> parralax;
	
public:
	void draw(Viewport &viewport);
	void add();
	void add(Parralax &parra);
	void add(const std::string &resource_id, CL_ResourceManager* manager);
	void clear();

	ParralaxManager();
	~ParralaxManager();
};

class ParralaxResourceData : public CL_ResourceData
{
public:
	float xMult;
	float yMult;
	std::string surface;

	virtual void on_load();

	ParralaxResourceData(CL_Resource &);
	~ParralaxResourceData();
};

#endif
